package com.anhry.www.safety.manage.oa.bean;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 
 * @author chen
 * @date 2012-8-9
 */
@Entity
@Table(name="TB_OA_NOTICE_FJ")
@SequenceGenerator(name="TB_OA_NOTICE_FJ_SEQ", sequenceName="TB_OA_NOTICE_FJ_SEQ_DB", allocationSize=1)
public class TbOaNoticeFj implements java.io.Serializable {

	// Fields

	private Long id;
//	private String noticeId;
	private TbOaNotice tbOaNotice;
	private String fjTitle;
	private String fjPath;
	private String isDele;
	private String version;
	private String fjSize;

	// Constructors

	/** default constructor */
	public TbOaNoticeFj() {
	}

	/** full constructor */
	public TbOaNoticeFj(TbOaNotice tbOaNotice, String fjTitle, String fjPath,
			String isDele, String version) {
		this.tbOaNotice = tbOaNotice;
		this.fjTitle = fjTitle;
		this.fjPath = fjPath;
		this.isDele = isDele;
		this.version = version;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="TB_OA_NOTICE_FJ_SEQ")
	@Column(name = "ID", precision = 11, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@ManyToOne(cascade = {CascadeType.REFRESH}, fetch = FetchType.EAGER)
	@JoinColumn(name="NOTICE_ID")
	public TbOaNotice getTbOaNotice() {
		return tbOaNotice;
	}

	public void setTbOaNotice(TbOaNotice tbOaNotice) {
		this.tbOaNotice = tbOaNotice;
	}
	@Column(name="FJ_TITLE", length=4000)
	public String getFjTitle() {
		return this.fjTitle;
	}

	public void setFjTitle(String fjTitle) {
		this.fjTitle = fjTitle;
	}
	@Column(name="FJ_PATH", length=4000)
	public String getFjPath() {
		return this.fjPath;
	}

	public void setFjPath(String fjPath) {
		this.fjPath = fjPath;
	}
	@Column(name="IS_DELE", length=1)
	public String getIsDele() {
		return this.isDele;
	}

	public void setIsDele(String isDele) {
		this.isDele = isDele;
	}
	@Column(name="VERSION", length=10)
	public String getVersion() {
		return this.version;
	}

	public void setVersion(String version) {
		this.version = version;
	}
	@Column(name="FJ_SIZE", length=20)
	public String getFjSize() {
		return fjSize;
	}

	public void setFjSize(String fjSize) {
		this.fjSize = fjSize;
	}

}